package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.Keep;

/**
 * @author du
 * date 2018/7/28 下午10:44
 */
@Keep
public class CategoryEntity implements Parcelable {
    /**
     * id : 1
     * name : 分类名
     */

    private String id;//分类id
    private String name;//分类名

    public String getId() { return id;}

    public void setId(String id) { this.id = id;}

    public String getName() { return name;}

    public void setName(String name) { this.name = name;}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.name);
    }

    public CategoryEntity() {}

    protected CategoryEntity(Parcel in) {
        this.id = in.readString();
        this.name = in.readString();
    }

    public static final Creator<CategoryEntity> CREATOR = new Creator<CategoryEntity>() {
        @Override
        public CategoryEntity createFromParcel(Parcel source) {return new CategoryEntity(source);}

        @Override
        public CategoryEntity[] newArray(int size) {return new CategoryEntity[size];}
    };
}
